package com.kgc.controller;

import com.kgc.exception.QgFinal;
import com.kgc.pojo.User;
import com.kgc.service.UserService;
import com.kgc.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("user")
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("userLoginByPhone")
    public Object userLoginByPhon(String phoneNum,String password){
        User user=userService.userLoginByPhon(phoneNum,password);
        if(user!=null){
            return user;
        }
        return  null;
    }
}
